// 成交统计 全景统计
#pragma once
#include <qbmessage/include/message_bond.h>
#include <qbprotocol/include/SSQBModel.h>
#include <qbtools/message/MessagePoster.h>

#include <QList>
#include <QObject>

#include "datareceiverDefines.h"
namespace {
const std::string strInterestRange[] = {"",    "1Y",  "2Y",  "3Y",
                                        "5Y",  "7Y",  "10Y", "15Y",
                                        "20Y", "30Y", "50Y", "LangTerm"};
const std::string strCreditRange[] = {"",   "1M", "3M", "6M", "1Y", "2Y",
                                      "3Y", "4Y", "5Y", "7Y", "10Y"};
const std::string strNCDPrimaryRange[] = {"", "1M", "3M", "6M", "9M", "1Y"};
const std::string strNCDRange[] = {"",   "15D", "1M", "2M",
                                   "3M", "6M",  "9M", "1Y"};
}  // namespace
class S_DATARECEIVER_EXPORT PanoramicDealReceiver : public QObject,
                                                    public MessageReceiver {
  Q_OBJECT
 public:
  static PanoramicDealReceiver& instance();
  void requestPanoramicDeal(bool bForce);
  void requestTermRange();

 protected:
  void onDataArrived(const qb::SSAckMsg& msg) override;

 signals:
  void dealMarketPush(int funcId, QList<xQBPanoramicMarketStreamUnit>);
  void dealMarketArrived();
  void termRangeArrived();

 private:
  PanoramicDealReceiver();
};
